package com.lixinlei.dubbo.consumer.quickstart;

import com.alibaba.dubbo.config.annotation.Reference;
import com.lixinlei.dubbo.ServiceAPI;
import org.springframework.stereotype.Component;

@Component
public class QuickStartConsumer {

    // 去注册中心按 ServiceAPI.class 的值去寻找
    @Reference(interfaceClass = ServiceAPI.class)
    ServiceAPI serviceAPI;

    public void sendMessage(String message) {
        System.err.println(serviceAPI.sendMessage(message));
    }

}
